Fix Kylix compilation errors

This patch fixes some compiling issues with (Cross)Kylix.