fix build error when compiling without regexp support