Merge pull request #44 from martinjlowm/master

Define missing 16 bit endian swap macro and fix some endian.h inclusion.

In effect fixes the issue #43 - this time for real.