Go with the mountain bike. If you have any inkling to go off road, then a full MTB will make life easier to find parts, replace parts and your enjoyment. A MTB is not going to be noticeable slower in a 5 mile commute if you simply outfit the bike with slicks or semi slicks if you do any off roading. I use semi-slicks because I do both trail riding and road riding depending on my mood and the conditions of my commute.
Jay