windows: add stdlib.h to satisfy reference to abort
build: fix check target for mingw
test: remove replacement snprintf for mingw

Mingw has a proper definition of snprintf.