Unify M2X library between arduino and mbed platform