Update system.cpp

Add native C++ support
Merge pull request #2036 from GregoryMorse:patch-1