Fix error "Site in not defined in base_layout.html"

I added an extra check for site variable in template. Sometimes "site" is not defined in the template when we are on one of the FOSUserBundle pages, for example.