fixed build on cmake <2.8.12 #983