Fixed extension support on osx, fixed linear math compile errors