Fix build with libboost >= 1.47. Closes #45

Uses BOOST_VERSION switch as suggested by @sanak in #45 but changes the condition to start using type_traits in clude with 1.47.00, to allow building with future patch-level releases in 1.46