bigendian fix by (Romain Dolbeau <dolbeau at irisa dot fr>)