quantlib: boost 1.57 compatibility

Patch backported from quantlib master. Builds and passes unit tests.