Fix boost detection on RHEL 5.

Refs #4962