fix compilation with openmp
Merge pull request #30 from jlothian/chris

fix compilation with openmp due to loop variable declarations, etc.