On Snow Leopard or before a restart of the app is required to hide the dock icon.