Fix openMP build

Tested to compile on VC12 with openMP activated.