Added extern C wrapper for threading commands. Should fix linking issues.