Segfault when using print() on OS X?