fix PyNullVariant error on Mac OS X