Thanks to @dfroger for the solution on SWIG for OSX