backported changed in commit ec4bb6 on metaskills/less-rails-bootstrap for rails 4 compatability