Add polyfill for Array#sample

To support Ruby v1.8