core: Fix BSD breakage, I hope