Minor fixes so it builds fine on debian squeeze.