Remove some cast warnings that are triggered in gcc 4.7 (seen in Fedora 18)

fixes #223