add support for forcing platform in ruby-2+, fix #2928