Add cast to build lv5 on FreeBSD 10.0