Add extern statement. Also fix the strlwr definition on Windows.
_strlwr is not present on non-Windows platforms.
Add files with test program.