Make tests 2.7-compatible
Export C API under Windows