Fixes test on Python 3 on OS X