Merge fixes and tests for jra's broken strstr_m() function from 3.0