use nim function instead of importc
get rid of erroneous packed pragma
add experimental pragma
removed warning for undefined symbol