use cdecl instead of --kill-at compiler flag; add built in tests