Portable macros in base/macros.h

Fix #216.
Done.