Fix crossbuild errors