Modify cmake files to allow for cross-compilation