Fix boost detection on gcc.