Fix APDU buffer problem under MAC OS.