Use stdlib instead of a custom implmentation

I was just looking through and I wasn't sure why you was using a custom implementation, maybe its a limitation of Byond, but i just thought to submit this in case it was overlooked.

This should be compatible all the way from 2.4-2.7, 3.2+