Electron energy loss distributions in solid and gaseous hydrocarbons