memory_limit calculation recognizes suffixes

For a script, I set my memory_limit to 2G. phpsh then helpfully set my memory limit to 4M. What the heck. This is a fix.