Fixed some cmake build issues.