Made changes to CMakelists for compatibility under Hydro (backward compatible aswell)