`{% matrix_s3_media_store_custom_endpoint_enabled %}` should have been `{% if matrix_s3_media_store_custom_endpoint_enabled %}` instead. Related to #132 (Github Pull Request).