Fixed small issues when building with cmake 2.8