Fixed minor compilation issues

Tested under Ubuntu 12.04.2 LTS
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)