Added toggleLabels()

Let the implementation handle the toggling of labels in a
platform-dependent way