Replacing an explicit loop with std::copy to solve #3 and #13

This seems to do the trick when I'm running it on an EC2 instance. Seems like GCC 4.8 goes too far optimizing redundant loops and removes the loop (that's the only explanation I can think of).