Fixed some compile errors found on BSD 9

refs #5