more el5 build fixes

* Link dynamically against libm to avoid relocation errors
  when building mesa on x86_64.