Fix compilation without OpenMP

The --disable-openmp option to the compile script produces source that won't build. With these changes, it builds and runs, but someone who actually knows C++ should check to make sure I've done it correctly.
fixes #121