Fix a gcc 4.1 linking error and a strict-aliasing warning

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>