I run into the same problem and found a solution which doesn't need custom templates or handlers. From Django 1.4 on you can use the tags get_media_prefix and get_static_prefix to access MEDIA_URL and STATIC_URL when they are not in the context.
In my particular case (Django 1.5), I wanted to access some static images in my page 500.html. I just added at the beginning of the template
{% load static %}
and then obtained the media and static urls with these tags
<img src="{% get_media_prefix %}logo.png">
<img src="{% get_static_prefix %}img/error_pages/error.png" style="height:235px;">
You can find the official documentation here: https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#get-static-prefix