Compiled this for FreeBSD 9.1, with only one source modification and 1 small change to the makefile... (The source change shouldn't actually make any difference, it's just extra curly braces where they shouldn't be needed, but the compiler was being fussy)
I'll send you the changes to check over via PM soon, so you can check them yourself (you may well have a better way of doing it)