Fix USE_BUNDLES compatibility with Python 3 (Fix #760)