updated code based on https://github.com/symfony-cmf/BlockBundle/pull/125
Merge pull request #238 from symfony-cmf/media_bundle

updated code based on https://github.com/symfony-cmf/BlockBundle/pull/125