Add state checks to new functions and use them in init.

Thanks to @Youka for the suggestions.
MSVS: output the correct library name.
Aegisub example: make defaultTimes work without video loaded.