Correctly fetch boost when using curl

Closes #2174
Review 1374 by @mlucy
Merge v1.12.x into next