Fix issues when using clang compiler (issue #170)

This should solve both the import error and the segfault.