use extended regular expressions if using std::regex

some compilers (e.g., GCC < 4.9) seem to need it...

thanks to [at]bska for digging this up!