fix compile errors in native.c