small compatability changes for earlier matlab versions