Fix cmake in non Windows platform