fix compile error for OpenMP version (wrong placement of #ifdef)