Check for Sprockets before using register_processor

In my case, I'm running Rails without the sprockets railtie:

    %w{ active_record action_controller }.each do |railtie|
      begin
        require "#{railtie}/railtie"
      rescue LoadError
      end
    end

This fix helps check for Sprockets before using the register_processor method in js.rb.