Ride the same as you have been, be loud, and, if all else fails, get out your waterbottle.

If you are able to stay stable and have a dog close to you, squirt water back at it as a last ditch effort. My mother once had a dog try to attack her while she was out riding and this was what stopped the dog.