Check if function exists before setting tool-bar-mode