set media_map to empty dict instead of null

fixes: http://manage.dimagi.com/default.asp?78443#450820