There is a missing !endif in your example.
@startuml
!define FILE_FORMAT_SVG 1
!ifdef FILE_FORMAT_SVG
title Test SVG
!else
!ifdef FILE_FORMAT_PNG
title Test PNG
!else
title Test with unknown type
!endif
!endif
Bob -> Alice : hello
@enduml
http://www.plantuml.com/plantuml/uml/ut8eBaaiAYdDpU7YKan9JSlCIrLmy_HnZNVp3_9r38aF3dDNC0HAPQO19T5bk4eoIt9I5K9IYqiKG5p5r9pYL6ng0_nGr8Au4BL8WkMP9HaAfNdPUVdbUGebbGL0WrBpKZBJO9HJVfA2hfs2OqvcSgg2bK96QavEFfS3K0xeTW00
But I agree that this is a bug and that the server should not return an error 500 in that case. We're going to investigate this one...