Fixed #847: make performMethodOnDispatchQueueAfterDelay thread safe