Use boost::regex if gcc version < 4.8.2

Please verify that this compiles well under Windows