fputws_unlocked implementation.