fixing some build issues with cmake