The energy straggling of hydrogen and helium ions in aluminum and polystyrene