Pass on optimisation flags to C[XX]FLAGS and fix bug that was raised by this previously.

The bug consisted of a non-standard way of using a single char as the
last member of a struct to store a longer string by mallocing the struct
with the extra bytes needed. There seems a variety of ways to define
this last member: 1) char name 2) char name[1] 3) char name[]. 1) is
what was used here but is non-standard. According to various source 2)
is also non-standard but used in so many places that it "works in
practice on all known compilers". 3) is c99 standard that has not been
incorporated in c++ standard. 1) proved not to work with -O3 which is
probably why we never passed these optimisation flags on.
In this particular case, the string (the name of a vtk field) didn't
actually need to be copied - we can just store the copy returned by vtk
- since we didn't actually mangle the name inside the struct.