BSD fixes

New style cast?