BUG: fix for matlab builds on some macs