workaround for inconsistent error messages across boost versions