Added fixes for compile issues see Ubuntu 10.04: dcbe34e, d02d1da, dc51758.