fix possible race condition in singleton

see https://github.com/wagnerandrade/Thunderstruck/issues/3