fix boost macros on non-GNU systems

Both boost_system and boost_filesystem macros rely on the GNU `tac`
tool and sed behaviour which isn't compatible with POSIX systems, like
Mac OS X. This updates both files with upstream fixes from
autoconf-archive; one patch is already in the repository, the other
has been submitted.
Merge pull request #17 from mistydemeo/boost_m4

fix boost macros on non-GNU systems