Fixes to allow compilation on Ubuntu 12.04 with boost 1.46.1-7ubuntu3

By default, allow file-system API version 3 to be used, but remain
compatible with version 2.