fix registerPlugin on iOS and make it available externally